package com.woniu.service.imple;

import com.woniu.adapter.PersonAdapter;
import com.woniu.outlet.po.Person;
import com.woniu.outlet.po.PersonCompany;
import com.woniu.outlet.po.PersonExtend;
import com.woniu.outlet.po.PersonFamily;
import com.woniu.service.IPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PersonService implements IPersonService {

    @Autowired
    private PersonAdapter personAdapter;

    @Override
    public int addpersoninfo(Person person) {
        int addpersoninfo = personAdapter.addpersoninfo(person);
        return addpersoninfo;
    }


    //修改个人用户的信息
    @Override
    public int updatepersoninfo(Person person) {
        int updatepersoninfo = personAdapter.updatepersoninfo(person);
        return updatepersoninfo;
    }

    //修改客户的扩展信息
    @Override
    public int updatepersonextend(PersonExtend personExtend) {
        int updatepersonextend = personAdapter.updatepersonextend(personExtend);
        return updatepersonextend;
    }

    //修改个人客户的公司信息
    @Override
    public int updatepersoncompany(PersonCompany personCompany) {
        int updatepersoncompany = personAdapter.updatepersoncompany(personCompany);
        return updatepersoncompany;
    }

    //添加个人客户的家人信息
    @Override
    public int addpersonfamily(PersonFamily personFamily) {
        int addpersonfamily = personAdapter.addpersonfamily(personFamily);
        return addpersonfamily;
    }

    //修改个人客户的家人信息
    @Override
    public int updatepersonfamily(PersonFamily personFamily) {
        int updatepersonfamily = personAdapter.updatepersonfamily(personFamily);
        return updatepersonfamily;
    }
}
